package com.bite.mybatis.demo.mapper;

import com.bite.mybatis.demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoMapper {
    @Select("select ta.id,ta.title, ta.content, ta.uid, tb.username, tb.password from article_info ta " +
            "left join user_info tb on ta.uid = tb.id " +
            "where ta.id = #{id} ")
    ArticleInfo selectArticleInfoAndUserInfo(Integer id);
}
